package com.craftplay.model;

import java.util.Objects;

/**
 * 支付类型
 */

public enum PayTypeEnum {

    //礼券状态枚举
    UNLOCK(1, "解锁视频"),
    DEPOSIT(2, "定价"),
    REFUNDS(3, "退款"),
    ENDCLASS(4, "尾款");

    private Integer payType;
    private String patTypeName;

    PayTypeEnum(Integer payType, String patTypeName) {
        this.payType = payType;
        this.patTypeName = patTypeName;
    }

    public static String getPayTypeName(Integer payType) {
        PayTypeEnum[] values = PayTypeEnum.values();
        for (PayTypeEnum giftCardStatusEnum : values) {
            if (Objects.equals(giftCardStatusEnum.getPayType(), payType)) {
                return giftCardStatusEnum.getPatTypeName();
            }
        }
        return "未知";
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public String getPatTypeName() {
        return patTypeName;
    }

    public void setPatTypeName(String patTypeName) {
        this.patTypeName = patTypeName;
    }
}
